﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Caching;

namespace Reconciliation.Business
{
    public class BusinessCacheManager
    {
        public enum Key { OrderListByInvoice, OrderListByDate, NewOrderList }
        public static void AddToCache(string key, object obj)
        {
            CacheManager orderListCache = (CacheManager)CacheFactory.GetCacheManager();
            orderListCache.Add(key, obj,
               CacheItemPriority.Normal, null);
        }

        public static object GetData(string key)
        {
            CacheManager orderListCache = (CacheManager)CacheFactory.GetCacheManager();
            return orderListCache.GetData(key);
        }
    }
}
